1. Field of the Invention
The present invention relates to a charger, in particular, an apparatus which prevents a charger from overcharging a capacitor.
2. Description of the Prior Art
Please refer to FIG. 1. FIG. 1 shows a prior art charger 100. The charger 100 includes a charging circuit 110, a voltage divider 120, a capacitor 130, a comparator 140, and a controller 150. The voltage divider 120 is not restricted to connect to the cathode of the rectifying diode 118, but could connect to the anode of the rectifying diode. The charging circuit 110 contains a transformer 112, which receives an input voltage Vin. A low level input voltage Vin is stepped up to a high level voltage by the transformer 112, and the high voltage passes through the rectifying diode 118 to charge the capacitor 130. The voltage at the terminal of the capacitor 130 is used as the output voltage for the charger 100. The on/off state of the transformer 112 is controlled by a MOSFET 116, which is driven by a driver 114. The driver 114 receives a control signal from the controller 150 and provides the MOSFET 116 with a driving voltage. The charging circuit 110 is of a Flyback configuration. The voltage divider 120 includes two resistors R1 and R2 connected in series. The voltage drop on the resistor R2 is a fraction of the output voltage Vout, and is regarded as a feedback voltage VFB. The feedback voltage VFB is compared with a predetermined reference voltage Vref by the comparator 140. The controller 150 generates the control signal based on the result given by the comparator 140.
The example below further illustrates the functions of the charger 100. For the flash operation of a camera, an input voltage of 3V is transformed into a high voltage to charge the capacitor 130. Since the flash requires a driving voltage as high as 300V, the target voltage of the capacitor 130 is set to 300V. The ratio of R2/R1 is set to 1/299, and the reference voltage Vref is set to 1V. After receiving an enable signal, the controller 150 sends the control signal to the driver 114, and the charging circuit 110 starts charging the capacitor 130. As the voltage of the capacitor 130 increases and moves towards the target voltage of 300V, the feedback voltage VFB moves towards a voltage of 1V, which is equal to the reference voltage Vref. When the voltage of the capacitor 130 is charged to 300V, the feedback voltage VFB is therefore equal to 300×[1/(1+299)]=1V. Once the feedback voltage VFB reaches the reference voltage Vref, the comparator 140 sends an indication signal to the controller 150. As soon as the indication signal is received, the controller 150 sends the control signal to stop the driver 114 and turn off the charging circuit 110. A ready signal indicating the full charge of the capacitor 130 is also sent out. As a result, the capacitor 130 can be carefully charged to capacity. However, if the resistor R1 is open-circuited or the resistor R2 is shorted, the controller 150 will never receive the indication signal from the comparator 140 because the feedback voltage VFB will never reach 1V. Therefore, the capacitor 130 will be overcharged and may face potential risks of high voltage damage to other components.